Integrand size = 23, antiderivative size = 255 \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\frac {\cot (e+f x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{\sqrt {a+b} f}-\frac {\cot (e+f x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{\sqrt {a+b} f}-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}} \]
[Out]
Time = 0.40 (sec) , antiderivative size = 255, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3960, 3918, 21, 3914, 3917, 4089} \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\frac {b^2 \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt {a+b \sec (e+f x)}}-\frac {\cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{f \sqrt {a+b}}+\frac {\cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{f \sqrt {a+b}}-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}} \]
[In]
[Out]
Rule 21
Rule 3914
Rule 3917
Rule 3918
Rule 3960
Rule 4089
Rubi steps \begin{align*} \text {integral}& = -\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}-\frac {1}{2} b \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^{3/2}} \, dx \\ & = -\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}}+\frac {b \int \frac {\sec (e+f x) \left (-\frac {a}{2}-\frac {1}{2} b \sec (e+f x)\right )}{\sqrt {a+b \sec (e+f x)}} \, dx}{a^2-b^2} \\ & = -\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}}-\frac {b \int \sec (e+f x) \sqrt {a+b \sec (e+f x)} \, dx}{2 \left (a^2-b^2\right )} \\ & = -\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}}-\frac {b \int \frac {\sec (e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx}{2 (a+b)}-\frac {b^2 \int \frac {\sec (e+f x) (1+\sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx}{2 \left (a^2-b^2\right )} \\ & = \frac {\cot (e+f x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{\sqrt {a+b} f}-\frac {\cot (e+f x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{\sqrt {a+b} f}-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}} \\ \end{align*}
Time = 7.39 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.02 \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\frac {\sqrt {\sec (e+f x)} \left (\frac {(b+a \cos (e+f x)) (-a+b \cos (e+f x)) \csc (e+f x)}{\left (a^2-b^2\right ) \sqrt {\sec (e+f x)}}+\frac {b \left (-\frac {(a+b) \sqrt {\frac {b+a \cos (e+f x)}{(a+b) (1+\cos (e+f x))}} \left (E\left (\arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a-b}{a+b}\right )-\operatorname {EllipticF}\left (\arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right ),\frac {a-b}{a+b}\right )\right )}{\sqrt {\frac {\cos (e+f x)}{1+\cos (e+f x)}}}-(b+a \cos (e+f x)) \tan \left (\frac {1}{2} (e+f x)\right )\right )}{\left (-a^2+b^2\right ) \sqrt {\sec ^2\left (\frac {1}{2} (e+f x)\right )} \sqrt {\cos ^2\left (\frac {1}{2} (e+f x)\right ) \sec (e+f x)}}\right )}{f \sqrt {a+b \sec (e+f x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(758\) vs. \(2(233)=466\).
Time = 5.73 (sec) , antiderivative size = 759, normalized size of antiderivative = 2.98
method | result | size |
default | \(-\frac {\sqrt {a +b \sec \left (f x +e \right )}\, \left (-\operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, a b \cos \left (f x +e \right )-\operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, b^{2} \cos \left (f x +e \right )+\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) a b \cos \left (f x +e \right )+\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) b^{2} \cos \left (f x +e \right )-\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, a b -\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, b^{2}+\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, a b +\sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \operatorname {EllipticE}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, b^{2}+a^{2} \cos \left (f x +e \right ) \cot \left (f x +e \right )-a b \cos \left (f x +e \right ) \cot \left (f x +e \right )+a b \cot \left (f x +e \right )-b^{2} \cot \left (f x +e \right )\right )}{f \left (a -b \right ) \left (a +b \right ) \left (b +a \cos \left (f x +e \right )\right )}\) | \(759\) |
[In]
[Out]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { \frac {\csc \left (f x + e\right )^{2}}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\int \frac {\csc ^{2}{\left (e + f x \right )}}{\sqrt {a + b \sec {\left (e + f x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { \frac {\csc \left (f x + e\right )^{2}}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { \frac {\csc \left (f x + e\right )^{2}}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx=\int \frac {1}{{\sin \left (e+f\,x\right )}^2\,\sqrt {a+\frac {b}{\cos \left (e+f\,x\right )}}} \,d x \]
[In]
[Out]